home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ian & Stuart's Australian Mac 1
/
Ian and Stuart's One (Australia).iso
/
Australasian Legends
/
Commercial
/
Rainbow Hill
/
MacDOS™ 2.0.0
/
User's Guide
/
10 MacDOS Scripting
< prev
next >
Wrap
Text File
|
1994-09-20
|
3KB
|
89 lines
10 MacDOS Scripting
MacDOS is AppleScript-able. If you use Apple's standard
Script Editor to access MacDOS' dictionary, you will obtain
the following:
Required Suite:
Events that every application should support
open: Open the specified object(s)
open alias -- list of objects to open
print: Print the specified object(s)
print alias -- list of objects to print
quit: Quit application
quit
run: Sent to an application when it is double-
clicked
run
MacDOS Suite:
Copyright © 1994 Rainbow Hill P/L.
All rights reserved.
dosExecute: Directs MacDOS to execute a command
dosExecute string -- the command to be
executed
setVar: Sets a MacDOS global variable
setVar string -- name of the variable
to string -- value to be assigned
getVar: Obtains the value of a MacDOS global
variable
getVar string -- name of the variable
Result: string -- the value of the variable
open executes the specified file[s] of type 'TEXT' as batch
program[s].
print prints the specified file[s] of type 'TEXT'.
quit quits MacDOS.
run launches MacDOS.
dosExecute parses and executes the parameter as if it were
a command entered from the keyboard. In particular,
dosExecute followed by the name of a text file directs
MacDOS to execute that file as a batch program.
setVar sets a MacDOS global variable to a given string.
getVar returns the value of a MacDOS global variable. This
is particularly useful to access the variable DOSERR,
which contains the error codes generated by MacDOS
commands.
MacDOS only asks for input from the keyboard if the client
application allows it (this is always the case if you use
Apple's Script Editor to write your scripts).
If the Apple Event disallows interaction with the user,
MacDOS follows the following rules:
• The input normally expected from the keyboard is handled
as if the user had typed a CNTL-C. This causes the
current command to be aborted as soon as an input is
required.
• Error reports are always sent to the console window as
strings of text regardless of whether ALARM is ON or
OFF.
• The /D switch of the PRINT command is ignored so that
the standard Print dialog is never displayed. Also when
requested to print the console window, MacDOS does not
display the standard Print dialog.
By setting the global variable SHOWAE to any value, you can
direct MacDOS to display the class and eventID of all Apple
Events received (actually, all High Level Events). This
lets you check that the originating application is working
correctly.
For debugging purposes, MacDOS displays in the console
window the name of all batch files started via Apple
Events.